3.734 \(\int \frac{(a+i a \tan (c+d x))^3}{\sqrt{\cot (c+d x)}} \, dx\)

Optimal. Leaf size=106 \[ -\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}-\frac{2 \left (a^3 \cot (c+d x)+i a^3\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}+\frac{8 i a^3}{d \sqrt{\cot (c+d x)}}+\frac{8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\cot (c+d x)}\right )}{d} \]

[Out]

(8*(-1)^(1/4)*a^3*ArcTanh[(-1)^(3/4)*Sqrt[Cot[c + d*x]]])/d - (8*a^3)/(5*d*Cot[c + d*x]^(3/2)) + ((8*I)*a^3)/(
d*Sqrt[Cot[c + d*x]]) - (2*(I*a^3 + a^3*Cot[c + d*x]))/(5*d*Cot[c + d*x]^(5/2))

________________________________________________________________________________________

Rubi [A]  time = 0.220157, antiderivative size = 106, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3673, 3553, 3591, 3529, 3533, 208} \[ -\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}-\frac{2 \left (a^3 \cot (c+d x)+i a^3\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}+\frac{8 i a^3}{d \sqrt{\cot (c+d x)}}+\frac{8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\cot (c+d x)}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])^3/Sqrt[Cot[c + d*x]],x]

[Out]

(8*(-1)^(1/4)*a^3*ArcTanh[(-1)^(3/4)*Sqrt[Cot[c + d*x]]])/d - (8*a^3)/(5*d*Cot[c + d*x]^(3/2)) + ((8*I)*a^3)/(
d*Sqrt[Cot[c + d*x]]) - (2*(I*a^3 + a^3*Cot[c + d*x]))/(5*d*Cot[c + d*x]^(5/2))

Rule 3673

Int[(cot[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_.))^(p_.), x_Symbol] :> Dist
[d^(n*p), Int[(d*Cot[e + f*x])^(m - n*p)*(b + a*Cot[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x
] &&  !IntegerQ[m] && IntegersQ[n, p]

Rule 3553

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[(a^2*(b*c - a*d)*(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(b*c + a*d)*(n + 1)), x] +
 Dist[a/(d*(b*c + a*d)*(n + 1)), Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1)*Simp[b*(b*c*(m
- 2) - a*d*(m - 2*n - 4)) + (a*b*c*(m - 2) + b^2*d*(n + 1) - a^2*d*(m + n - 1))*Tan[e + f*x], x], x], x] /; Fr
eeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 1] && LtQ[
n, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3591

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(A*b - a*B)*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)*(a^2
 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[a*A*c + b*B*c + A*b*d - a*B*d - (A*b*
c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rule 3529

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3533

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(2*c^2)/f, S
ubst[Int[1/(b*c - d*x^2), x], x, Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(a+i a \tan (c+d x))^3}{\sqrt{\cot (c+d x)}} \, dx &=\int \frac{(i a+a \cot (c+d x))^3}{\cot ^{\frac{7}{2}}(c+d x)} \, dx\\ &=-\frac{2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}-\frac{2}{5} \int \frac{(i a+a \cot (c+d x)) \left (-6 i a^2-4 a^2 \cot (c+d x)\right )}{\cot ^{\frac{5}{2}}(c+d x)} \, dx\\ &=-\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}-\frac{2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}-\frac{2}{5} \int \frac{-10 i a^3-10 a^3 \cot (c+d x)}{\cot ^{\frac{3}{2}}(c+d x)} \, dx\\ &=-\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}+\frac{8 i a^3}{d \sqrt{\cot (c+d x)}}-\frac{2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}-\frac{2}{5} \int \frac{-10 a^3+10 i a^3 \cot (c+d x)}{\sqrt{\cot (c+d x)}} \, dx\\ &=-\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}+\frac{8 i a^3}{d \sqrt{\cot (c+d x)}}-\frac{2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}-\frac{\left (80 a^6\right ) \operatorname{Subst}\left (\int \frac{1}{10 a^3+10 i a^3 x^2} \, dx,x,\sqrt{\cot (c+d x)}\right )}{d}\\ &=\frac{8 \sqrt [4]{-1} a^3 \tanh ^{-1}\left ((-1)^{3/4} \sqrt{\cot (c+d x)}\right )}{d}-\frac{8 a^3}{5 d \cot ^{\frac{3}{2}}(c+d x)}+\frac{8 i a^3}{d \sqrt{\cot (c+d x)}}-\frac{2 \left (i a^3+a^3 \cot (c+d x)\right )}{5 d \cot ^{\frac{5}{2}}(c+d x)}\\ \end{align*}

Mathematica [A]  time = 3.76751, size = 164, normalized size = 1.55 \[ \frac{a^3 e^{-3 i c} \sqrt{\cot (c+d x)} (\cos (3 (c+d x))+i \sin (3 (c+d x))) \left (\sec ^3(c+d x) (17 i \sin (c+d x)+21 i \sin (3 (c+d x))-5 \cos (c+d x)+5 \cos (3 (c+d x)))-80 \sqrt{i \tan (c+d x)} \tanh ^{-1}\left (\sqrt{\frac{-1+e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}}\right )\right )}{10 d (\cos (d x)+i \sin (d x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])^3/Sqrt[Cot[c + d*x]],x]

[Out]

(a^3*Sqrt[Cot[c + d*x]]*(Cos[3*(c + d*x)] + I*Sin[3*(c + d*x)])*(Sec[c + d*x]^3*(-5*Cos[c + d*x] + 5*Cos[3*(c
+ d*x)] + (17*I)*Sin[c + d*x] + (21*I)*Sin[3*(c + d*x)]) - 80*ArcTanh[Sqrt[(-1 + E^((2*I)*(c + d*x)))/(1 + E^(
(2*I)*(c + d*x)))]]*Sqrt[I*Tan[c + d*x]]))/(10*d*E^((3*I)*c)*(Cos[d*x] + I*Sin[d*x])^3)

________________________________________________________________________________________

Maple [C]  time = 0.315, size = 520, normalized size = 4.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^3/cot(d*x+c)^(1/2),x)

[Out]

1/5*a^3/d*2^(1/2)*(cos(d*x+c)-1)*(-20*I*sin(d*x+c)*EllipticF((-(cos(d*x+c)-1-sin(d*x+c))/sin(d*x+c))^(1/2),1/2
*2^(1/2))*((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*((cos(d*x+c)-1+sin(d*x+c))/sin(d*x+c))^(1/2)*(-(cos(d*x+c)-1-sin(d
*x+c))/sin(d*x+c))^(1/2)*cos(d*x+c)^2+20*I*sin(d*x+c)*EllipticPi((-(cos(d*x+c)-1-sin(d*x+c))/sin(d*x+c))^(1/2)
,1/2+1/2*I,1/2*2^(1/2))*((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*((cos(d*x+c)-1+sin(d*x+c))/sin(d*x+c))^(1/2)*(-(cos(
d*x+c)-1-sin(d*x+c))/sin(d*x+c))^(1/2)*cos(d*x+c)^2+20*((cos(d*x+c)-1)/sin(d*x+c))^(1/2)*((cos(d*x+c)-1+sin(d*
x+c))/sin(d*x+c))^(1/2)*(-(cos(d*x+c)-1-sin(d*x+c))/sin(d*x+c))^(1/2)*cos(d*x+c)^2*EllipticPi((-(cos(d*x+c)-1-
sin(d*x+c))/sin(d*x+c))^(1/2),1/2+1/2*I,1/2*2^(1/2))*sin(d*x+c)+21*I*2^(1/2)*cos(d*x+c)^3-21*I*2^(1/2)*cos(d*x
+c)^2-5*sin(d*x+c)*2^(1/2)*cos(d*x+c)^2-I*cos(d*x+c)*2^(1/2)+5*cos(d*x+c)*sin(d*x+c)*2^(1/2)+I*2^(1/2))*(cos(d
*x+c)+1)^2/cos(d*x+c)^2/sin(d*x+c)^4/(cos(d*x+c)/sin(d*x+c))^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.70995, size = 217, normalized size = 2.05 \begin{align*} \frac{5 \,{\left (\left (2 i - 2\right ) \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} + \frac{2}{\sqrt{\tan \left (d x + c\right )}}\right )}\right ) + \left (2 i - 2\right ) \, \sqrt{2} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} - \frac{2}{\sqrt{\tan \left (d x + c\right )}}\right )}\right ) - \left (i + 1\right ) \, \sqrt{2} \log \left (\frac{\sqrt{2}}{\sqrt{\tan \left (d x + c\right )}} + \frac{1}{\tan \left (d x + c\right )} + 1\right ) + \left (i + 1\right ) \, \sqrt{2} \log \left (-\frac{\sqrt{2}}{\sqrt{\tan \left (d x + c\right )}} + \frac{1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{3} - 2 \,{\left (i \, a^{3} + \frac{5 \, a^{3}}{\tan \left (d x + c\right )} - \frac{20 i \, a^{3}}{\tan \left (d x + c\right )^{2}}\right )} \tan \left (d x + c\right )^{\frac{5}{2}}}{5 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^3/cot(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

1/5*(5*((2*I - 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2/sqrt(tan(d*x + c)))) + (2*I - 2)*sqrt(2)*arctan(-1/2
*sqrt(2)*(sqrt(2) - 2/sqrt(tan(d*x + c)))) - (I + 1)*sqrt(2)*log(sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) +
 1) + (I + 1)*sqrt(2)*log(-sqrt(2)/sqrt(tan(d*x + c)) + 1/tan(d*x + c) + 1))*a^3 - 2*(I*a^3 + 5*a^3/tan(d*x +
c) - 20*I*a^3/tan(d*x + c)^2)*tan(d*x + c)^(5/2))/d

________________________________________________________________________________________

Fricas [B]  time = 1.4893, size = 1077, normalized size = 10.16 \begin{align*} -\frac{5 \, \sqrt{\frac{64 i \, a^{6}}{d^{2}}}{\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac{{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{\frac{64 i \, a^{6}}{d^{2}}}{\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 5 \, \sqrt{\frac{64 i \, a^{6}}{d^{2}}}{\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac{{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt{\frac{64 i \, a^{6}}{d^{2}}}{\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 16 \,{\left (13 \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 11 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 8 \, a^{3}\right )} \sqrt{\frac{i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{20 \,{\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^3/cot(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

-1/20*(5*sqrt(64*I*a^6/d^2)*(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*d*e^(2*I*d*x + 2*I*c) + d)*lo
g(1/4*(8*I*a^3*e^(2*I*d*x + 2*I*c) + sqrt(64*I*a^6/d^2)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt((I*e^(2*I*d*x + 2*I*c
) + I)/(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c)/a^3) - 5*sqrt(64*I*a^6/d^2)*(d*e^(6*I*d*x + 6*I*c) + 3
*d*e^(4*I*d*x + 4*I*c) + 3*d*e^(2*I*d*x + 2*I*c) + d)*log(1/4*(8*I*a^3*e^(2*I*d*x + 2*I*c) - sqrt(64*I*a^6/d^2
)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)))*e^(-2*I*d*x - 2*I*c
)/a^3) - 16*(13*a^3*e^(6*I*d*x + 6*I*c) + 6*a^3*e^(4*I*d*x + 4*I*c) - 11*a^3*e^(2*I*d*x + 2*I*c) - 8*a^3)*sqrt
((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1)))/(d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*
d*e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{3} \left (\int - \frac{3 \tan ^{2}{\left (c + d x \right )}}{\sqrt{\cot{\left (c + d x \right )}}}\, dx + \int \frac{3 i \tan{\left (c + d x \right )}}{\sqrt{\cot{\left (c + d x \right )}}}\, dx + \int - \frac{i \tan ^{3}{\left (c + d x \right )}}{\sqrt{\cot{\left (c + d x \right )}}}\, dx + \int \frac{1}{\sqrt{\cot{\left (c + d x \right )}}}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**3/cot(d*x+c)**(1/2),x)

[Out]

a**3*(Integral(-3*tan(c + d*x)**2/sqrt(cot(c + d*x)), x) + Integral(3*I*tan(c + d*x)/sqrt(cot(c + d*x)), x) +
Integral(-I*tan(c + d*x)**3/sqrt(cot(c + d*x)), x) + Integral(1/sqrt(cot(c + d*x)), x))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3}}{\sqrt{\cot \left (d x + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^3/cot(d*x+c)^(1/2),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^3/sqrt(cot(d*x + c)), x)